import 'package:boss/provider/commodity_provider.dart';
import 'package:boss/ui/page/costManagement/eventBus/event_bus.dart';
import 'package:boss/ui/page/costManagement/page/widget/cost_management_batch_list.dart';
import 'package:boss/ui/widget/button/fixed_bottom_btn.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class CostManagementBatchBrowser extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Consumer<CommodityProvider>(
      builder: (context, commodityProvider, _) {
        return Column(
          children: <Widget>[
            CostManagementBatchList(
              commodityProvider: commodityProvider,
            ),
            FixedBottomBtn(
              title: '保 存',
              onTap: () {
                costEventBus.fire(BatchSub(data: true));
              },
            ),
          ],
        );
      },
    );
  }
}
